import React, { lazy, Suspense } from 'react';
import { Navigate } from 'react-router-dom';
 
import Home from '../pages/home'; 
const LazyWrapper = (path) => {
  const Component = lazy(() => import(`../pages${path}`));
  return (
    <Suspense fallback={null}>
      <Component />
    </Suspense>
  );
};

const routes  = [
  {
    path: '/',
    element: <Navigate to="/home" />
  },
  {
    path: '/home',
    element: <Home />,
    children: [
    ]
  },
  {
    path: '/uiux',
    element: LazyWrapper('/uiux')
  }, 
  {
    path: '/Info',
    element: LazyWrapper('/info')
  },
  {
    path: '/threed',
    element: LazyWrapper('/threed')
  },
  {
    path: '/tutorials',
    element: LazyWrapper('/tutorials')
  },
  {
    path: '/web',
    element: LazyWrapper('/web')
  },

  // {
  //   path: '*',
  //   element: LazyWrapper('/not-found')
  // }
];

export { routes };
